
local mt = ac.skill['弧形闪电']
mt.temp = '闪电链'
function mt:on_add()
    local hero = self.owner
    self:gc(hero:event '单位-攻击命中'(function(_,_,target)
        if not self:is_cooling() then
            local cast = self:create_cast()
            self:cooling()
            cast.damage = hero:get('攻击') * self.data1/100
            cast:notify('shot_lightning',target)
        end
    end))
end



local mt = ac.skill['神恩']

function mt:on_add()
    local hero = self.owner
    self:gc(hero:add('智力成长',self.data2))
    self:gc(hero:event '单位-释放技能结束'(function(_,_,target)
        for u in ac.selector('unit')
            : range(hero,1200)
            : ally(hero)
            : loop()
        do
            u:add_buff '神恩'{data1 = self.data1}
        end
    end))
end


local buff = ac.buff['神恩']
buff.time = 3
buff.cover_type = 1

function buff:on_add()
    local hero = self.owner
    self:gc(hero:add('攻击速度',self.data1))
end
